﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body,
html {
    overflow: hidden !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    font-family: "Georgia", serif;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
}

/* Main Content */
.main-content {
    position: relative;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100vw;
    padding: 20px;
}

.title {
    font-size: 3rem;
    font-weight: bold;
    color: #d63384;
    text-align: center;
    margin-bottom: 2rem;
    animation: pulse 2s ease-in-out infinite;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Letter/Envelope Styles */
.letter-container {
    position: relative;
    margin-bottom: 2rem;
    perspective: 1000px;
}

.envelope {
    position: relative;
    width: 384px;
    height: 256px;
    background: #fff;
    cursor: pointer;
    transition: all 0.5s ease;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    border-radius: 8px;
}

    .envelope:hover {
        transform: translateY(-4px);
        box-shadow: 0 32px 64px rgba(0, 0, 0, 0.35);
    }

.envelope-body {
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 8px;
    position: relative;
    z-index: 10;
}

.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 128px;
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
    transition: all 1s ease;
    z-index: 50;
    border-radius: 8px 8px 0 0;
    clip-path: polygon(0 0, 50% 75%, 100% 0);
    transform-origin: 50% 0%;
    transform-style: preserve-3d;
}

.envelope.open .envelope-flap {
    transform: rotateX(-180deg);
}

.heart-seal {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    z-index: 60;
    transition: all 0.8s ease;
}

.envelope.open .heart-seal {
    opacity: 0;
    transform: translateX(-50%) scale(0) rotate(360deg);
}

.letter {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 320px;
    height: 192px;
    background: linear-gradient(135deg, #fffef7, #faf9f0);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid #f0f0f0;
    transition: all 1.2s ease 0.5s;
    z-index: 200;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    pointer-events: none;
}

.envelope.open .letter {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.letter-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

    .letter-content h2 {
        color: #d63384;
        font-size: 1.25rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
        text-align: center;
    }

    .letter-content p {
        color: #333;
        font-size: 0.875rem;
        line-height: 1.4;
        margin-bottom: 0.5rem;
    }

.signature {
    text-align: right;
    font-style: italic;
    color: #d63384;
    margin-top: 0.75rem !important;
    font-size: 0.875rem !important;
}

.click-instruction {
    color: #d63384;
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
    0%, 50%, 100% {
        opacity: 1;
    }

    25%, 75% {
        opacity: 0.5;
    }
}

/* Sliding Photo Strip - 5 Photos Infinite Loop */
.photo-slider-container {
    width: 100%;
    max-width: 80rem;
    height: 140px;
    overflow: hidden;
    border-radius: 1rem;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    margin-top: 2rem;
}

.photo-slider {
    display: flex;
    height: 100%;
    align-items: center;
    animation: slideInfinite 15s linear infinite;
    width: 400%; /* 5 fotoğraf x 4 tekrar için genişlik */
}

.photo-item {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    margin: 0 10px;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border: 4px solid #fff;
    transition: transform 0.3s ease;
}

    .photo-item:hover {
        transform: scale(1.1) rotate(2deg);
    }

    .photo-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

@keyframes slideInfinite {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-25%); /* 4 set'ten 1'ini kaydır */
    }
}

/* Confetti Animation */
@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

@keyframes sparkle {
    0% {
        opacity: 1;
        transform: scale(0) rotate(0deg);
    }

    50% {
        opacity: 1;
        transform: scale(1) rotate(180deg);
    }

    100% {
        opacity: 0;
        transform: scale(0) rotate(360deg);
    }
}

@keyframes flyUp {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }

    .envelope {
        width: 320px;
        height: 213px;
    }

    .letter {
        width: 280px;
        height: 160px;
        padding: 16px;
    }

    .photo-item {
        width: 80px;
        height: 80px;
    }

    .photo-slider-container {
        margin-top: 1rem;
    }
}
